package com.qf.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.omg.CORBA.portable.IDLEntity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
public class UserEmp  implements Serializable {

	@Id
	private Integer id;

	//@Column(name = "create_time")
	private java.util.Date createTime;

	//@Column(name = "user_id")


	private String userId;

	//@Column(name = "login_number")

	private String loginNumber;

	private String password;

	//@Column(name = "user_name")

	private String userName;

	//@Column(name = "role_id")

	private Integer roleId;

	//@Column(name = "dept_id")

	private Integer deptId;

	//@Column(name = "card_id")

	private String cardId;

	//@Column(name = "user_phone")

	private String userPhone;

	//@Column(name = "user_email")

	private String userEmail;

	//@Column(name = "user_adress")

	private String userAdress;

	//@Column(name = "start_use")
	private Integer startUse;

	//盐值
	private String salt;



	//	//让通用mapper忽略此属性

	//用户表中对应着角色
	@Transient
	private UserRole userRole;

	//用户有自己的菜单
	private List<SystemMnue> userMnues;

	//员工部门
	@Transient
	private Department department;

	//修改添加专用构造


	public UserEmp(Integer id, String loginNumber, String password, String userName, Integer roleId, Integer deptId, String cardId, String userPhone, String userEmail, String userAdress) {
		this.id = id;
		this.loginNumber = loginNumber;
		this.password = password;
		this.userName = userName;
		this.roleId = roleId;
		this.deptId = deptId;
		this.cardId = cardId;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userAdress = userAdress;
	}
}
